﻿<html>
	<head>
		<title>Tree - jQuery LigerUI API</title>     
 
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 
		<link href="../common.css" rel="stylesheet" type="text/css" />
		<script src="../core.js" type="text/javascript"></script> 
	</head>
	<body>
		<h2>事件列表</h2> 

		<table class="apitable" cellpadding="0" cellspacing="0">
			 <thead>
            <tr> 
				<td>事件名</td>
				<td>参数</td> 
				<td>描述</td> 
			</tr>
            </thead>
            <tbody>
					<tr> 
                <td> 
                    <a name="event_onBeforeExpand" key="onBeforeExpand" class="linkname"></a>
                                                                     onBeforeExpand
                        
                    				</td>
                <td> 
                                        ({data,target})
                    				</td>
				<td class="description"> 
                                        展开前事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onContextmenu" key="onContextmenu" class="linkname"></a>
                                                                     <a href="#link75" title="点击查看示例">onContextmenu</a>
                        
                    				</td>
                <td> 
                                        ({data,target})
                    				</td>
				<td class="description"> 
                                        右击事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onExpand" key="onExpand" class="linkname"></a>
                                                                     onExpand
                        
                    				</td>
                <td> 
                                        ({data,target})
                    				</td>
				<td class="description"> 
                                        展开事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onBeforeCollapse" key="onBeforeCollapse" class="linkname"></a>
                                                                     onBeforeCollapse
                        
                    				</td>
                <td> 
                                        ({data,target})
                    				</td>
				<td class="description"> 
                                        收缩前事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onCollapse" key="onCollapse" class="linkname"></a>
                                                                     onCollapse
                        
                    				</td>
                <td> 
                                        ({data,target})
                    				</td>
				<td class="description"> 
                                        收缩事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onBeforeSelect" key="onBeforeSelect" class="linkname"></a>
                                                                     onBeforeSelect
                        
                    				</td>
                <td> 
                                        ({data,target})
                    				</td>
				<td class="description"> 
                                        选择前事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onSelect" key="onSelect" class="linkname"></a>
                                                                     onSelect
                        
                    				</td>
                <td> 
                                        ({data,target})
                    				</td>
				<td class="description"> 
                                        选择事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onBeforeCancelSelect" key="onBeforeCancelSelect" class="linkname"></a>
                                                                     onBeforeCancelSelect
                        
                    				</td>
                <td> 
                                        ({data,target})
                    				</td>
				<td class="description"> 
                                        取消选择前事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onCancelselect" key="onCancelselect" class="linkname"></a>
                                                                     onCancelselect
                        
                    				</td>
                <td> 
                                        ({data,target})
                    				</td>
				<td class="description"> 
                                        取消选择事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onCheck" key="onCheck" class="linkname"></a>
                                                                     onCheck
                        
                    				</td>
                <td> 
                                        ({data,target},checked)
                    				</td>
				<td class="description"> 
                                        选择事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onSuccess" key="onSuccess" class="linkname"></a>
                                                                     onSuccess
                        
                    				</td>
                <td> 
                                        (data)
                    				</td>
				<td class="description"> 
                                        加载成功事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onError" key="onError" class="linkname"></a>
                                                                     onError
                        
                    				</td>
                <td> 
                                        (XMLHttpRequest, textStatus, errorThrown)
                    				</td>
				<td class="description"> 
                                        加载错误事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onClick" key="onClick" class="linkname"></a>
                                                                     onClick
                        
                    				</td>
                <td> 
                                        ({data,target})
                    				</td>
				<td class="description"> 
                                        点击事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onBeforeAppend" key="onBeforeAppend" class="linkname"></a>
                                                                     onBeforeAppend
                        
                    				</td>
                <td> 
                                        (parentNode, newdata)
                    				</td>
				<td class="description"> 
                                        追加数据前事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onAppend" key="onAppend" class="linkname"></a>
                                                                     onAppend
                        
                    				</td>
                <td> 
                                        (parentNode, newdata)
                    				</td>
				<td class="description"> 
                                        追加数据事件
                    				</td> 
			</tr>
					<tr> 
                <td> 
                    <a name="event_onAfterAppend" key="onAfterAppend" class="linkname"></a>
                                                                     onAfterAppend
                        
                    				</td>
                <td> 
                                        (parentNode, newdata)
                    				</td>
				<td class="description"> 
                                        追加数据后事件
                    				</td> 
			</tr>
		
     
        </tbody>
		</table>


                                                           <a name="link75"></a>
                <h3 class="event">onContextmenu事件 示例：</h3>

                <p>
                <pre><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;"> 1</span> <span style="color: #000000;"> menu </span><span style="color: #000000;">=</span><span style="color: #000000;"> $.ligerMenu({ top: </span><span style="color: #000000;">100</span><span style="color: #000000;">, left: </span><span style="color: #000000;">100</span><span style="color: #000000;">, width: </span><span style="color: #000000;">120</span><span style="color: #000000;">, items:
</span><span style="color: #008080;"> 2</span> <span style="color: #000000;">            [
</span><span style="color: #008080;"> 3</span> <span style="color: #000000;">            { text: </span><span style="color: #000000;">'</span><span style="color: #000000;">增加</span><span style="color: #000000;">'</span><span style="color: #000000;">, click: itemclick, icon: </span><span style="color: #000000;">'</span><span style="color: #000000;">add</span><span style="color: #000000;">'</span><span style="color: #000000;"> },
</span><span style="color: #008080;"> 4</span> <span style="color: #000000;">            { text: </span><span style="color: #000000;">'</span><span style="color: #000000;">修改</span><span style="color: #000000;">'</span><span style="color: #000000;">, click: itemclick },
</span><span style="color: #008080;"> 5</span> <span style="color: #000000;">            { line: </span><span style="color: #0000FF;">true</span><span style="color: #000000;"> },
</span><span style="color: #008080;"> 6</span> <span style="color: #000000;">            { text: </span><span style="color: #000000;">'</span><span style="color: #000000;">查看</span><span style="color: #000000;">'</span><span style="color: #000000;">, click: itemclick }
</span><span style="color: #008080;"> 7</span> <span style="color: #000000;">            ]
</span><span style="color: #008080;"> 8</span> <span style="color: #000000;">            });
</span><span style="color: #008080;"> 9</span> <span style="color: #000000;">
</span><span style="color: #008080;">10</span> <span style="color: #000000;">            $(</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">#tree1</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">).ligerTree({ onContextmenu: </span><span style="color: #0000FF;">function</span><span style="color: #000000;"> (node, e)
</span><span style="color: #008080;">11</span> <span style="color: #000000;">            { 
</span><span style="color: #008080;">12</span> <span style="color: #000000;">                actionNodeID </span><span style="color: #000000;">=</span><span style="color: #000000;"> node.data.text;
</span><span style="color: #008080;">13</span> <span style="color: #000000;">                menu.show({ top: e.pageY, left: e.pageX });
</span><span style="color: #008080;">14</span> <span style="color: #000000;">                </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> </span><span style="color: #0000FF;">false</span><span style="color: #000000;">;
</span><span style="color: #008080;">15</span> <span style="color: #000000;">            }
</span><span style="color: #008080;">16</span> <span style="color: #000000;">            });</span></div></pre>
                </p>
                                                                                                                                                                                                                                                                                                            	</body>
</html>